Skip to content

Replace sprockets-sass with dartsass-sprockets#2649

Merged
simon04 merged 5 commits intofreeCodeCamp:mainfrom
spamguy:sass
Mar 18, 2026
Merged

Replace sprockets-sass with dartsass-sprockets#2649
simon04 merged 5 commits intofreeCodeCamp:mainfrom
spamguy:sass

Conversation

@spamguy
Copy link
Contributor

@spamguy spamguy commented Feb 11, 2026

This PR modernizes the Sass compilation pipeline by migrating from the deprecated sprockets-sass gem to dartsass-sprockets. Closes #2214 and #2450.

After merging, the way should be clear to upgrade various other gems previously blocked by Sass.

Highlights

  • Updated sprockets to v4
  • Replaced sprockets-sass with dartsass-sprockets in the build pipeline
  • Added manual precompilation of .scss.erb files to the Thor task. dart-sass doesn't handle ERB preprocessing automatically, so this step is now explicit in the build process
  • Removed deprecated @import statements in favor of @use

Testing Notes

There should be no user-facing impact. I did my utmost to confirm this through smoke tests, env comparisons, unit tests, etc. Verifying the quality of a production build on my li'l dev machine is possibly beyond my understanding, but will gladly take any advice.

@spamguy spamguy requested a review from a team as a code owner February 11, 2026 04:36
@socket-security
Copy link

socket-security bot commented Feb 11, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedsprockets@​3.7.5 ⏵ 4.2.289100100100100
Addeddartsass-sprockets@​3.2.197100100100100

View full report

spamguy and others added 5 commits March 17, 2026 09:38
Add manual precompile of .scss.erb files to thor task, since dart-sass is no longer responsible for it.

Remove @import statements deprecated by dart-sass, and add them as @use clauses in individual modules.

Replace deprecated darken() functions with color.adjust(). Update copyright year in README.
Copy link
Contributor

@simon04 simon04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thank you for looking into this again. 😄 -- Let's give it a try. 🤞

@simon04 simon04 merged commit 6a9dde6 into freeCodeCamp:main Mar 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EOL warning after bundle install

2 participants